<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/3/7
 * Time: 12:05
 */
header("Content-type:JSON;charset=utf-8");  //统一输出编码为utf-8
header("Access-Control-Allow-Origin:*");//允许跨域
if($_SERVER["REQUEST_METHOD"]=="POST") {
    session_start();
//不是空的 session 就能输出当前的session内容
    if (!empty($_SESSION["USER"])) {
        $row = $_SESSION["USER"];
//    $str = "当前的登陆者：<a href='javascript:void(0)'>" . $row["tel"] . "</a>";
//    $str .= " <a href='javascript:void(0)'>退出登陆</a>";
        print_r($row);
        print_r('<input id="uid" type="hidden" value="'.$row["u_id"].'">');
    } else {
        print_r("您还没登陆");
    }
}